約 2,617,579 件
https://w.atwiki.jp/matchmove/pages/134.html
View Menu Reset View CameraViewのリセットです。イメージサイズは拡大縮小(マウススクロールまたは右ドラッグ)可能ですが、ResetViewでイメージがCameraView一杯のイメージサイズに戻ります。 Expand to Fit Reset Viewと同じです。 Reset Time Bar TimeBarのリセット。右ドラッグで移動したTimeBarをリセットします。 (直訳)アクティブフレームレンジを正確に表示可能なエリアいっぱいにします。 Rewind 巻き戻し。現在時刻を最初のアクティブフレームにセットします。 To End 最後フレームへ。現在時刻を最後のアクティブフレームにセットします。 Play in Reverse 逆再生。セットすると、リプレイまたはトラッキングが現在フレームから最初に向かって進みます。 Frame by Frame フレーム毎を可能な限り速く再生します。 Quarter Speed ノーマルスピードの1/4倍速再生です。 Half Speed ノーマルスピードの1/2倍速再生です。 Normal Speed ノーマルスピード(frm/sec値)再生です。必要に応じてフレーム落ちしながらノーマルスピードで再生します。 注:Trackerパネルが選択されているときは、トラッキングでフレームがスキップされてしまうことを避けるため、 再生は常にframe-by-frameです。 Double Speed 2倍速再生です。必要に応じてフレーム落ちします。 Show Image カメラビューの主要なイメージの表示をオン/オフします。 Show Trackers カメラビューでのトラッカー長方形の表示をオン/オフします。 Only Camera01 s trackers 現在選択中のカメラもしくはオブジェクトのトラッカーだけを表示します。 チェックをONすると、他のオブジェクト/カメラのトラッカーが非表示になります。 Shotメニューで現在選択中のカメラ/オブジェクトを変えるたびに、カメラ/オブジェクトの名は変わります。 Show Tracker Trails ONするとトラッカーのテイルが表示されます。未来(赤)過去(青)です。 Show 3-D Points 解析位置マーク(X)の表示をコントロールします。 Show 3-D Seeds SEEDポジションマーク(+)の表示をコントロールします。 Show Seed Paths ONすると「SEED」パスの値と、カメラと移動オブジェクトの視野/焦点距離が表示、編集されます。 「Use Seed Paths」モードと、カメラ制約のために使われます。OFFすると解析値が表示されます。 Show Meshes カメラビューポート内のオブジェクトメッシュの表示をコントロールします。メッシュは3Dビューポート内で常に表示されます。 Solid Meshes ONするとメッシュはカメラビューポート内でメッシュがソリッド表示になりますOFFするとメッシュがワイヤーフレームになります。 Shadows パースペクティブウインドウで地面やオブジェクト上の影を表示します。 This setting is sticky from SynthEyes run to run. Show Lens Grid レンズディストーション(歪み)グリッドの表示です。(レンズコントロールパネルが開いているときのみです) OpenGL Camera View 有効時、OpenGLカメラビューが使用されます。大きなメッシュ(50,000頂点以上)が存在する場合はMAC上で高速です。 複雑なメッシュがない限り、WINDOWS機ではOFFにしてください。 OpenGL 3-D Viewports 有効時、3DビューポートのOpenGLバージョンが使用されます。MACの場合や大きなメッシュ(50,000頂点以上)が存在する場合高速です。 複雑なメッシュがない限り、WINDOWS機ではOFFにしてください。 Double Buffer わずかに遅いが、フリッカーの無いグラフィック。最大の再生速度が必要な時だけ、OFFしてください。 Sort Alphabetic UP/DOWN矢印キーで、トラッカーをアルファベット順にソートします。グラフエディタでセッティングを変えるとき、更新されます。 Sort by Error トラッカーをHIGH ERRORからLOW ERRORへソートします。 Sort by Time トラッカーをショットの始めから後へソートします。 Only Selected Splines チェックすると、Show This Splineの状態に関係なく選択したスプラインだけが表示されます。 Safe Areas 個々にオン/オフすることができる(たとえば、すぐに90%と80%をオンにすることができます)いろいろなsafe areaのためのサブメニューです。safe areaのサイズは、SynthEyesフォルダのsafe08.iniで定められます。 あなた自身の個人のsafe area定義を加えるために、safe08.iniを編集することができます。
https://w.atwiki.jp/fkswiki/pages/13.html
Let s study English!!
https://w.atwiki.jp/battlefield1942/pages/110.html
Machine translation ver Original Information Page URL (Japanese Language) http //www4.atwiki.jp/battlefield1942/pages/55.html Forgotten Hope Secret Weapon ?plugin=ref page=FHSW file=FHSWlogo.jpg Official Title Forgotten Hope Secret Weapon FHSW Mod development team leader FHSWman Version of FHSW 0.5 FHSW Official blog "Secret Ordnance Factory" (Japanese Language) http //wbmuse.blog89.fc2.com/ FHSW Arms explanation website (Japanese Language) http //fhseheiki.web.fc2.com/ Contents list Machine translation ver Forgotten Hope Secret WeaponContents list MOD introduction Installation method DownloadFHSW 0.5 Client File FHSW 0.4 English Language and German Language Patch (Non Official) Old FHSW versionFHSW v0.3beta2 Client File Comment MOD introduction This MOD is never used for the actual combat and is miniMOD of FH that can use experimental arms that do not become arms and mass production that has faced the end of the war and other classified weapons. Main body of FH0.7 and fan map packing 6 are necessary for the FHSW play. Addition..map..appear..map..aircraft..test..for..custom..map. And, six MAP that exists in packing 6 of fan map of FH. "TEST FIELD" is a map for the bug check and the aircraft performance examination, and no multi directions. As for the map to which the cope is supported with FH, the cope is basically possible also by FHSW. Because a lot of bugs were confirmed with Ver0.1, a part of the function has been deleted by some arms. Concretely, it is a mobile installation function of Flak30, and a bullet change function of 42 expression charge howitzer shell. Other deleted parts exist, and details are being written in the file of 0.1A patch attachment. Installation method Download FHSW 0.5 Client File Mirror PrinceUmeboshi.jpn Website (http //princeumeboshi.servegame.com) (go to "Download" page) Mirror AKISABA http //akisaba.dyndns.org/up/bf1942/FHSW050Client1of3.rar http //akisaba.dyndns.org/up/bf1942/FHSW050Client2of3.rar http //akisaba.dyndns.org/up/bf1942/FHSW050Client3of3.rar FHSW 0.4 English Language and German Language Patch (Non Official) FHSWv0.4_EnglishAndGermanLanguagePatch_v1.1.zip (86.8 KB) FHSW Mini Info http //greatjapanempireld.hp.infoseek.co.jp/bf1942fhsw/download_file/FHSWv0.4_EnglishAndGermanLanguagePatch_v1.1.zip(DeadLink) Old FHSW version FHSW v0.3beta2 Client File FHSW030beta2ClientFull.zip (1.87 GB) FileFront http //files.filefront.com/FHSW+03b2+03b2/;13645383;/fileinfo.html Comment 名前 コメント
https://w.atwiki.jp/nakamura001/pages/46.html
ルール:3Dの「はちゅねミク」を表示する プラットフォーム 状況 備考 iPhone 制覇 Opera 制覇 O3D 制覇 iアプリ 無理 OpenGL ESが使えるのはトラステッドiアプリだけみたいなので無理。 Android これから Native Client これから 調査したところ、OpenGLは2Dで使用されているだけっぽい。3D対応されるまで保留 Mac 制覇 Windows これから
https://w.atwiki.jp/mutomasa/pages/12.html
English 日常会話 ネットワーク 技術一般
https://w.atwiki.jp/ceviouser/pages/39.html
0. about this siteWhat's this site? Who is the administrator of this site? I found some mistake in this site. 1. Basic QuestionWhat is CeVIO? Let me hear some song voices. How many characters are there in CeVIO? How do you think about CeVIO's voice quality? Does it have English voices? Does it have English interface? 2. How to use trial versionWhat's the CeVIO trial version? How can I install CeVIO trial version? Do I have to change the locale? Can Mac users use CeVIO? 3. How to buy and install product versionHow can I buy CeVIO product version? How can I buy CeVIO physical package version? How much is CeVIO? How can I install CeVIO product version? How can I update CeVIO product version? I want to transfer CeVIO to my new computer. 4. When you can't launch CeVIOI can't launch CeVIO. 5. How to use Talk voices 6. How to use Song voicesAre there any tutorials?official tutorials for English voices users' tutorials in English How can I import MIDI/ust/vsq files? How can I export MIDI files? How can I enter lyrics?enter by lyrics enter by phonemes What's TMG? What's VIA/VIF? I want to turn off the automatic vibrato to draw it manually. I think Sasara sings too choppy. Does CeVIO have some form of flag system? 0. about this site What s this site? This site is an unofficial site where CeVIO users (or potential users) share the information about CeVIO (know-how, useful tools or so on). We hope it helps you. Who is the administrator of this site? main administrator otamakazaha I found some mistake in this site. The writer is not so good at English. Please let us know below. You can also correct it (this site is made on WIKI). 名前 コメント 1. Basic Question What is CeVIO? CeVIO is one of the speech/song synthesis softwares first released in 2013. You can make speech voice (talk voice) or singing voice (song voice) easily. It has some voice characters as SATO sasara, ONE -ARIA ON THE PLANETES-, AKASAKI Minato or so on. The official introduction is here or the video below. (Introduction of song voice is from 2 02.) (CeVIO has had many updates, so the contents of the video is partly old.) Let me hear some song voices. ONE (female) Minato (male) How many characters are there in CeVIO? 12 characters (in 2017). Their appearance is here. name M/F talk voice song voice Sato Sasara(さとうささら) female JP JP Suzuki Tsuzumi(すずきつづみ) female JP Takahashi(タカハシ) male JP ONE -ARIA ON THE PLANETES-(オネ) female JP JP IA -ARIA ON THE PLANETES-(イア) female JP EN also has VOCALOID3 JP voice Akasaki Minato(赤咲湊) male JP red Midorizaki Kasumi(緑咲香澄) female JP green Ginsaki Yamato(銀咲大和) male JP silver Kinzaki Koharu(金咲小春) female JP gold Shirosaki Yuudai(白咲優大) male JP white Kizaki Airi(黄咲愛里) female JP yellow HAL-O-ROID(ハルオロイド・ミナミ) male JP for free ("JP" "EN" means they have voices in Japanese or English language.) How do you think about CeVIO s voice quality? CeVIO uses HMM parametric system to generate the voice. That may decay smoothness a little, but that makes the voice more natural and animated in the aspect of ways of pronouncing and singing. Does it have English voices? In June 29, 2018, the first CeVIO English song voice "IA ENGLISH C -ARIA ON THE PLANETES-" is released. It has two type of voices, "Natural" and "Powerful". The official site is here. Does it have English interface? CeVIO has English interface. The interface language depends on your Windows settings, though you can change it at the toolbar →「ツール(T)」→「オプション(O)」→「表示言語」and pull down「英語」→「OK」button→ close and relaunch CeVIO. 2. How to use trial version What s the CeVIO trial version? You can use the trial version for free for 30 days. The characters you can use are Sasara (song talk), Tsuzumi (talk) and Takahashi (talk). You can also use HAL-O-ROID (song) for free while you can use song editor. The contents of the trial version is same as the product version, except for the limitation of period and no function of exporting to wav file. How can I install CeVIO trial version? 1. Get the installer The installer is here or here. HAL-O-ROID’s installer is here. 2. Launch the installer and install You don t need to change locale of your computer (from Version 6.0 (CeVIO Creative Studio 6)). 3. Launch CeVIO and fill in mail address Launch CeVIO and wait for the window as below. Check 「体験版を開始する」and fill in your mail address as below. (Put the right address you can receive e-mails with, because you are going to use it when you need re-register. Don t forget the mail address you entered!) 4. Complete! Now, you can use the trial version. Your computer needs to be online every time when you launch CeVIO trial version. Do I have to change the locale? No, you don t need to change the locale of your computer (from Version 6.0 (CeVIO Creative Studio 6)). Can Mac users use CeVIO? CeVIO is currently for Windows only. 3. How to buy and install product version How can I buy CeVIO product version? You can buy the product version online with credit card or other payments. The tutorial is here or here (made by Uchuu). When you bought one, don t forget to back up your serial number outside of your computer! How can I buy CeVIO physical package version? Probably you can also order physical package version (below) through amazon.jp. Talkeditor Talkvoice Songeditor Songvoice price CeVIO Creative Studio package (starter) ● SasaraTsuzumiTakahashi ● Sasara about 10,000 yen+ shipping cost ONE blue package (starter) ● ONE ● ONE about 16,000 yen+ shipping cost ONE white package (voices only) ONE ONE about 11,000 yen+ shipping cost How much is CeVIO? For example, the starter pack for Sasara song voice is basically 8,640 JP yen. If you have already bought song editor, you can use HAL-O-ROID for free (without registration). If you once bought starter pack (editor + voice) and are going to add some voice, you need to buy new voice only (a lot cheaper than starter pack). Each price of CeVIO products is here (please read with translation). How can I install CeVIO product version? 1. Install the editor Do as the same as 1. and 2. of how to install trial version. 2. Buy the CeVIO product Buy the product as above. Check the serial number (or called "licence key"), which is informed through the e-mail after the payment, or printed inside the package. It is like "aBCd1-2EF3g-H4IjK-L5mN6". 3. Fill in the serial number of editor Launch CeVIO and wait for the window as below (if you are using the trial version, launch CeVIO and click 「ヘルプ(H)」→「ライセンス認証(L)」). Select 「ライセンス認証を行う」, fill in the serial number and your mail address as below. (Put the right address you can receive e-mails with, because you are going to use it when you need re-register. Don t forget the mail address you entered!) 4. Install the voice If you bought the voice other than "Sasara" "Tsuzumi" or "Takahashi", you need to also install the voice data. Get the voice installer, which can be get through the e-mail after the payment, or the DVD of the package. Check the serial number (or called "licence key") of the voice, which is informed through the e-mail after the payment, or printed inside the package. 5. Fill in the serial number of each voice Launch CeVIO and click 「ヘルプ(H)」→「ライセンス認証(L)」. Fill in the serial number of each voice. How can I update CeVIO product version? How to update/upgrade the editor of CeVIO product version is the same as how to install trial version. Also the voices are sometimes updated, so check here (as below) so as you have the newest voice. I think it is better to update it (when you aren t focusing on work with it), as newest version often has solved the problems or has new useful functions. I want to transfer CeVIO to my new computer. 1 licence (serial number) corresponds to 1 computer. If you want to transfer CeVIO to your new(other) computer, you have only to install CeVIO with the new computer and enter your serial number. You don t need deactivation. Keep in mind if you install it to different computers more than 4 times, you might need re-authenticate (re-register) to launch it. 4. When you can t launch CeVIO I can t launch CeVIO. Your computer needs to be online when you first launch CeVIO product version and every 365 days. Your computer needs to be online everytime when you launch CeVIO trial version. If you get the dialog box containing "ライセンス再認証", you need to ask CeVIO official to re-authenticate (re-register) your computer from here. You need to fill in "メールアドレス" the mail address you entered when you first launched CeVIO. As for "お問い合わせの種別", choose "ライセンス再認証が表示された". 5. How to use Talk voices 6. How to use Song voices Are there any tutorials? There are some tutorials in English as below. official tutorials for English voices 【IA ONE】ARIA STATION「ONE先生のIA ENGLISH C講座 #1」(18/7/6)【English Subtitle】 In this video, they put lyrics like [twinkle][-], but the specification changed and now you should put lyrics like [twin][-kle] or [twinkl][-e]. 【IA ONE】ARIA STATION「ONE先生のIA ENGLISH C講座 #2」(18/7/26)【English Subtitle】 users tutorials in English CeVIO Basics/Tutorial - Singing by Rinshuu CeVIO Creative Studio S Tutorial (The Basics) by Zefurry How can I import MIDI/ust/vsq files? MIDI drag drop the MIDI file to CeVIO s upper area. ust convert it to smf(MIDI) by UTAU, or convert ust to ccs by UtaFormatix vsq or vsqx or vpr convert it to ccs by UtaFormatix, or convert it to smf(MIDI) by UTAU How can I export MIDI files? Choose the red track (in the upper window), right-click on it and select "エクスポート" → "MIDIの書き出し". How can I enter lyrics? You can enter lyrics directly or by phonemes. enter by lyrics Click NOR button and doubleclick the note, and you can enter the lyrics. To move to next note, just press TAB key. You can enter words of several syllables like [twin][-kle]. To enter 1 vowel in several notes, enter "-" in other than the first note (like [a][-maz][-ing][-][-]). The consonants following that vowel (like [ng]) automatically laid out in the last note. enter by phonemes To enter phonemes directly (with alphabets), rightclick the piano-roll and click "音素で歌詞入力(P)". Phoneme palette rises up and you can directly enter phonemes through the palette or your keyboard. CeVIO uses (for English voices) phonetic signs called "Arpabet", widely used in voice synthesis researches. Arpabet is written in 1 or 2 (or 3) alphabets for 1 phoneme, so you can enter it directly with your keyboard. The conversion table is here (Wikipedia). You can enter 1 or several phonemes in 1 note. You can even enter 1 consonant only, or several vowels in 1 note. To enter plural phonemes in 1 note, put in “,” between them (when entering on "音素で歌詞入力(P)” mode). What s TMG? TMG = timing of phonemes. When you want to change the timing of a whole phoneme, first click the pen tool and drag the dark gray zone at the bottom of the piano-roll to left/right. Each phoneme is composed of five parts.Each part corresponds to how humans produce sounds and open/close the mouth.When you want to change the timing of a part of a phoneme, drag the each line to left/right. Click TMG button and click the font of VOL, and you can easily see how the volume (and other parameters) changes in response to TMG. What s VIA/VIF? VIA = vibration amplitude. VIF = vibration frequency. The bigger, the more frequent vibrato gets. Click PIT button and click the font of VIA/VIF, and the pale vibrato line appears on pitch line. If you want to generate vibrato on the area naturally has no vibrato, you need to draw both VIA AND VIF on the area. I want to turn off the automatic vibrato to draw it manually. If you want to turn it off in a part of a trackOpen VIA, and draw the line on the bottom (0.00cent) at the part. If you want to turn it off in the whole trackRight-click the piano roll, and click 「調整モード(M)」→「ビブラート無効(V)」. I think Sasara sings too choppy. Edit TMG(timing) parameter between vowels or "ん(N)" as below. Does CeVIO have some form of flag system? CeVIO has a few system like flag. 1. falsetto put "$" (for English voices) or "※" (for Japanese voices) in the note It works well in high key. ONE or Kizaki Airi are good at it. http //guide2.project-cevio.com/songtrack/song_04 2. voice quality look at the link. Default is 50 (or +0.00). The higher it is, the more mature the voice gets. http //guide2.project-cevio.com/songtrack/song06 It works in the whole track. If you want to change it in some notes, you can copy the track, change it and put them together on DAW. 3. use TMG CeVIO voices change its quality in each area of "TMG(timing)". http //guide2.project-cevio.com/songtrack/song07 If you want breathy voice in some notes, the last TMG area of each notes often has breathy quality, so you can make it wide. If you want powerful voice in some notes, some of the 2nd~4th TMG area often has powerful quality, so you can make it wide. 4. death voice / vocal fry delete the parameter of PIT by selecting eraser tool and dragging with Shift key on PIT in the note https //cevio.jp/guide/cevio_cs7//songtrack/song05 It gets complete death voice (or breathy voice). Some use it as lapping it over the ordinary notes on DAW. If you use it at the certain short part of the note (such as beginning), it sounds like vocal fry. comment anything about CeVIO 名前 コメント
https://w.atwiki.jp/yserver_info/pages/18.html
Open Tweenは過去にオープンソースであったTweenを基にしたTwitterクライアントです "OpenTween"とは別のプロジェクトとなります ==== Ver 1.1.2.0(2012/02/11) * CHG 事故防止のため表記名をTweenからOPEN Tweenへ変更 * CHG 配布予定未定だがTween Update改変し無効化 + incomment CheckNewVersion WAIT Tweenがクローズドソースとなっているためアイコンを変更しなければならない コメント 一覧 名前
https://w.atwiki.jp/wiki12_peanut/pages/21.html
公式サイトリンク 動作環境 動作環境の調べ方 コメント 公式サイトリンク 動作環境 ダウンロード 動作環境 稼働環境 推奨環境 OS Microsoft Windows 2000 / XP Microsoft Windows 2000 / XP CPU Pentium3 1GHz以上 Pentium4 2GHz以上 メモリ 256MB以上 512MB以上 グラフィックスボード 32MB以上のビデオメモリーを有するグラフィックスボード 64MB以上のビデオメモリーを有するグラフィックスボード OpenGL OpenGL v1.2対応 OpenGL v1.2対応 DirectX DirectX version9.0以降 DirectX version9.0以降 ハードディスク 500MB以上の空き容量 500MB以上の空き容量 ネットワーク環境 128kbps以上 ADSL 1Mbps以上 対応デバイス USBゲームパッド(8ボタン以上) USBゲームパッド(8ボタン以上 他にキーボードとホイールボタンつきマウスが必要 USBゲームパッドは無くても問題なし。 SiS系のチップセットでは起動しないようです 動作環境の調べ方 Windowsのスタートメニューにある「ファイル名を指定して実行」を選択 「名前:」となっている右側の欄に「dxdiag」と入力してOKを押す DirectX診断ツールが起動するので以下の項目を参照して、稼働環境を満たしているか調べる システムタブ オペレーティングシステム(OS) プロセッサ(CPU) メモリ DirectXバージョン ディスプレイタブ メモリ合計(グラフィックスボード) コメント 名前 コメント
https://w.atwiki.jp/takonori/pages/13.html
戻る openSIPS Memo インストール 設定 予定 openSIPS Memo openSIPS公式ページ → http //www.opensips.org/ openSIPSに関するメモを残していく予定。 インストール 必要な環境、インストール方法はパッケージ内のINSTALLファイルに記述してある。詳しくはそちらを見るとよい。 openSIPSの公式ページから最新版をダウンロード(2009/04/02時点でopenSIPS-1.5.0)して適当なフォルダに置く。(/usr/local/src等) $ cd /usr/local/src $ wget http //opensips.org/pub/opensips/1.5.0/src/opensips-1.5.0-tls_src.tar.gz $ tar zxvf opensips-1.5.0-tls_src.tar.gz $ cd opensips-1.5.0-tls TLS版でもTLSはデフォルトではない。Makefileを編集する必要がある。 $ vi Makefile #TLS=1 TLS=1 //コメントアウトを外す ビルドとインストール $ make clean $ make //opensips本体のみビルド make allで本体とモジュールを一括ビルド $ make modules //モジュール群をビルド $ su # make install 各ファイルの場所 設定ファイル /usr/local/etc/opensips モジュール /usr/local/lib/opensips/modules 実行ファイル /usr/local/sbin 起動スクリプトが欲しい時はopensips-1.5.0-tls/packagingフォルダ内を参照。 設定 予定 LBモジュール使ってみる MemCacheモジュール使ってみる IPv6
https://w.atwiki.jp/shin1/pages/12.html
Google App Engineメモ どこまでがappengineの話でどこからがpythonなのかDjangoなのか、とか区別せずに書いているので注意。 Google App Engineメモ datastore関連 ユニークなキーについて。 別Modelへの参照について。 親子関係について Transactionについて。 logging(ロギング) !!dev_appserver.py --require_indexes index.yamlに無いインデックスを使用するクエリが実行された時に、index.yamlにインデックスを追加しない。つまり、アップロード後と同じ状態で実行できる。 --clear_datastore datastoreを全て消去する。 datastore関連 ユニークなキーについて。 "entity.key().id()"で取得できる。 class MyModel(db.Model) text = db.StringProperty() myModel = MyModel(text="hoge") id = myModel.key().id() myModel2 = MyModel.get_by_id(id) 別Modelへの参照について。 "db.ReferenceProperty(Modelクラス名)"を使用する。 作成方法 class MyModel1(db.Model) text = db.StringProperty() class MyModel2(db.Model) text = db.StringProperty() myModel1 = db.ReferenceProperty(MyModel1) 取得方法 普通の値のバインドと同じように使用できる。 myModel1 = MyModel1.get_by_id(1) myModel2s = MyModel2.gql("WHERE myModel1= bind", bind=myModel1") 注意点として「永続化されていないEntity(Modelのインスタンス)を設定する事はできない」という注意点がある。 template内での使用方法 {{ myModel1.key.id }} みたいなカンジで。 親子関係について Googleのデータは親子関係を指定できる。Modelのparent属性で設定できる。 設定方法 class MyModelRoot(db.Model) text = db.StringProperty() date = db.DateTimeProperty(auto_now_add=True) class MyModel(db.Model) text = db.StringProperty() date = db.DateTimeProperty(auto_now_add=True) # 親子関係を作らない。 model = MyModel(text="hoge") # 親子関係を作る。 root = MyModelRoot(text="fuga") model = MyModel(parent=root, text="hoge") # parent=root, parentを指定した取得方法 "ANCESTOR IS"を使用する。 parentKey = 1 root = MyModelRoot.get_by_id(key) models = MyModel.gql("WHERE ANCESTOR IS parent", parent=root) Transactionについて。 "db.run_in_transaction(関数, 関数へのパラメータ...)"を使用する。 class MyModel1(db.Model) text = db.StringProperty() anotherModelInfo = db.NumberProperty() class MyModel2(db.Model) ref = db.ReferenceProperty(MyModel1) class Controller(webapp.RequestHandler) def post(self) datas = [] ... # MyModelのlistであるdatasを作成。 db.run_in_transaction(self.insert, datas) def insert(datas) for data in datas data.put() 以下の制限に注意。 Transaction中にクエリを発行できない("BadRequestError Can t query inside a transaction."なる例外が発生する)。 必要なデータはTransaction開始前にあらかじめ全部作っておいて、put()やdelete()の更新操作のみをTransactionでくるんでやるような、小さなTransactionを心がける必要がある。 ReferencePropertyの「永続化されていないEntity(Modelのインスタンス)を設定する事はできない」という制限も考えると、工夫が必要な場合もあるが、Transactionを小さくするという意味では安全な設計を心がける良い練習になるかもなぁ。 Transaction中でクエリが使えないと、更新対象に対して関連のあるEntityを芋づるで削除したいときに困るかも。そんな時はModel.get_by_id()を使って更新対象を取得すれば良い。 例えば以下のような例。 class MyModel1(db.Model) title = StringProperty() class MyModel2(db.Model) ref = ReferenceProperty(MyModel1) otherRef = ReferenceProperty(OtherModel) def method() model1 = MyModel1.get_by_id(int(idString)) model2s = MyModel2.gql("WHERE ref = ref", ref=model1) db.run_in_transaction(delete_cascade, model1, model2s) def delete_cascade(model1, model2s) db.delete(model2s) model1.delete() 一見すると、run_in_transaction()の中ではクエリは無いように見えるが"db.delete(model2s)"実行時に内部的に"WHERE ref= ref"のクエリが走るため、そこで"BadRequestError Can t query inside a transaction."となってしまう。ただし、クエリが使えないといってもGqlQuery系が使えない、という意味なので"Model.get_by_id()"を使う事は問題ないみたいだ。 def method() model1 = MyModel1.get_by_id(int(idString)) _model2s = MyModel2.gql("WHERE ref = ref", ref=model1) model2Ids = [] for m2 in _model2s model2Ids.append(m2.key().id()) model2s = MyModel2.get_by_id(ids=model2Ids) db.run_in_transaction(delete_cascade, model1, model2s) idのリストを作って…というのが面倒だが、今のところこれしか方法がわからない。 logging(ロギング) ログの出力には「import logging」でimportしたモジュールを使えば良いらしい。Javaに似ていて使いやすい。main()メソッド内でLoggerのLogLevelを設定する。 import logging def myMethod(hoge) logging.getLogger().debug("myMethod start.") ... logging.getLogger().debug("myMethod end.") class MyHandler(webapp.RequestHandler) def post(self) logging.getLogger().info("MyHandler.post start.") ... def main() logging.getLogger().setLevel(logging.DEBUG) application = webapp.WSGIApplication( [( / , MainPage)], debug=True) wsgiref.handlers.CGIHandler().run(application) if __name__ == "__main__" main()